package com.czxy.mapper;

import com.czxy.pojo.Brand;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author 张青卯
 */
@org.apache.ibatis.annotations.Mapper
public interface BrandMapper extends Mapper<Brand> {

    /**
     * fingBrandById 根据商品ID查品牌
     * @param catid 商品ID
     * @return List<Brand>
     */
    @Select("SELECT * FROM tb_category_brand t,tb_brand s WHERE t.brand_id=s.id AND t.category_id = #{catid}")
    List<Brand> fingBrandById(@Param("catid") Integer catid);

}
